package com.arctan.mhxy_utils_android.db.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.arctan.mhxy_utils_android.db.entity.IncomeEntity;

import java.util.List;

@Dao
public interface IncomeDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    long inseartAndUpdateIncome(IncomeEntity entity);
    @Query("SELECT * FROM income WHERE dateTime=:dateTime")
    IncomeEntity getIncome(String dateTime);
    @Query("SELECT * FROM income WHERE dateTime=:dateTime")
    List<IncomeEntity> getIncomeList(String dateTime);
}
